1. Technical Field
The present invention relates to electronic still cameras and methods of recording image data within such electronic still cameras.
2. Description of the Related Art
Electronic still cameras convert an image of a subject into electrical signals using an image-pickup element such as a charged coupled device (CCD). Such cameras have circuitry to convert the electrical signals into digital data which are recorded on a recording medium such as in a memory card or on a magnetic medium (e.g., a hard or flexible disc). A typical and exemplary signal processing circuit of an electronic still camera is shown in FIG. 3.
Referring now to FIG. 3, it will be observed that the signal processing circuit therein depicted consists of a lens system (not shown), a shutter for controlling exposures, an image-pickup processor 1 which receives image light from a subject through an aperture, an A/D converter 2, a buffer memory 3, a compressor 4, a card interface (I/F) 5, a memory card 6 for recording image data and a sequence controller 7.
It will be further observed that after converting image light from a subject into electrical signals using a photoelectric conversion element such as a CCD, the image-pickup processor 1 performs signal processing such as gamma conversion to generate image signals. A/D converter 2, converts the aforementioned image signals from the image-pickup processor 1 into digital signals and stores such digital signals (e.g., data) in buffer memory 3 as image data.
Data (i.e., imaging data) which has been stored in buffer memory 3 is read out as required and also is supplied to compressor 4 wherein data compression is performed. The output of compressor 4 is compressed image data. The compressed image data is recorded in memory card 6 via card I/F 5.
Sequence controller 7 is a data recover unit which performs control of a series of photographic operations including management of memory card 6 and sequence control of all other systems. In the case where image data is recorded to memory card 6 without first performing compression, no processing need be performed by compressor 4, and the image data read from buffer memory 3 is recorded "as is" to memory card 6 through I/F 5.
As is well known, when data is recorded to a memory card, data management operations need be performed to accurately store and retrieve valuable data and information and to effectively and efficiently manage the space limitations of the recording medium (i.e., to avoid exhausting system resources). Such data management operations include the manipulation of data management data (i.e., meta data--data about image data such as file names, file storage parameters, file sizes, etc.). Additionally, when manipulating data, there is often the need to manipulate data management data such as record start addresses and data segment sizes. Various systems have been used to perform such data management operations. One such system utilizes the well-known MS-DOS operating system which is explained below.
Referring now to FIG. 4, therein depicted is a typical case where data is recorded to a memory card using the MS-DOS operating system. At one level, MS-DOS provides for the management of data in units called "clusters." The size of one (1) cluster varies according to the formatting method of a recordable media, but is typically 512 KB or 1024 KB. If the volume of the data that a persons wishes to store becomes large, several clusters are used and chained together via addressing utilizing conventional techniques.
Parameters which are necessary when data is to be written to and read from a memory device such as a memory card include the number of FATs (file allocation tables) and the number of route directory entries. These parameters are recorded in a boot sector region of a recordable medium. When multiple clusters are used in data recording, their chained data is recorded in the FAT region. Also, as shown in FIG. 5, the file names for the respective recorded data, the cluster number at which recording was started, the data size, and other data are recorded in the route directory region.
As an example, when data is recorded using three clusters, clusters 2, 3, and 4 under file name FILE001, the next cluster number, "3" is recorded into the FAT region of cluster 2 and, at the same time, "4" is recorded to the FAT region of cluster 3, then a code, which signifies that it is the final cluster is recorded in the FAT of cluster 4. That final code is "FFFh", for example, in the case of a 12-bit FAT. Moreover, FILE001 is recorded as the file name and "2" is recorded as the cluster start number in the region of directory entry 1 of the route directory region.
Referring now to FIG. 6, therein depicted is a flow chart which illustrates the procedures which are to be performed in the case in which data is actually recorded to a memory card. Before recording the data, it is necessary to perform processing to search for empty or available clusters, but this processing is assumed to have been performed in advance with there having been empty or available clusters present. First, in response to the record start, data is recorded to the first empty cluster L in step 102. Next, in step 103, data such as the file name, the record start cluster number L, and the file size are recorded to the directory entry section inside the route directory region.
Next, in step 104, a determination is made as to whether all of the data has been recorded. If not, processing commences in step 105, and if so, processing commences in step 113. That is, if there is data of a size which can be recorded into one cluster, processing commences in step 113. If step 113 has been proceeded to, a completion code which signifies that it is the last cluster is recorded to the FAT region of cluster L, and processing is completed. For example, as explained above, FFFh is recorded for the completion code in the case of a 12-bit FAT.
If it has been determined that all of the data has not been recorded in step 104, processing commences in step 105 wherein data is recorded into cluster M, which is the next empty cluster. In step 106, the cluster M number, that is, M, is recorded to the FAT region of cluster L as chained data which has been recorded into cluster L and then into cluster M.
In step 107, a determination is again made as to whether all of the data has been recorded. If not, processing commences in step 108 and, if so, processing commences in step 114. That is, if there is data of a size which can be recorded into two clusters, processing commences in step 114. If step 114 has been proceeded to, a completion code (FFFh in the case of a 12-bit FAT) which indicates that it is the last cluster is recorded to the FAT region of cluster M, and processing is completed.
In contrast to the operations described above, if it has been determined that all of the data has not been recorded in step 107, processing is commenced in step 108 wherein data is recorded into cluster N, which is the next empty cluster. Next, in step 109, the cluster N number, that is, N, is recorded to the FAT region of cluster M as chained data which has been recorded into cluster M and then into cluster N.
Next, in step 110, if it is determined that not all of the data has been recorded, processing is again commenced in step 108 wherein there is recording to cluster N, which is the next empty cluster, and the same type of operation is repeated thereafter. If all of the data has been recorded, processing is commenced in step 111, and a completion code (FFFh in the case of a 12-bit FAT) which signifies that it is the last cluster is recorded to the FAT region of cluster N, and processing is completed.
With electronic still cameras of the type mentioned above, a problem is realized when a memory card is removed, a battery of the electronic still camera body is removed or fails, or a sharp drop in battery capacity occurs while data is being recorded to the memory card. In such situations, the recording of data is interrupted or improperly and/or erroneously carried out. In such cases, a type of nonconformity occurs in data such as the FAT data and directory entry, which are the aforementioned chained data. That is, the FAT chain is interrupted, and there are cases in which the actually recorded data size and the file size recorded in the directory entry do not match and in which some type of chained data is recorded in the FAT of a cluster which is actually not in use, making the data unusable and erroneous.
For example, in the aforementioned recording example, when recording is interrupted while cluster 3 is being recorded, neither the number of the cluster recorded next nor the end code are recorded in the FAT of cluster 3. Moreover, irregularities can result which include the file size inside the directory entry differing from the actually recorded data size. In this way, when some irregularity occurs in data such as the FAT data and the directory entry, which are the chained data recorded to the memory card, even if the recording data related to that irregularity is accessed later and fetched, an appropriate image cannot be obtained. Also, because data with this type of irregularity is recorded in the memory card as invalid data, irregularities such as not being able to effectively utilize the recording range of the memory card can and often does occur.
In view of the foregoing comments, the purpose of the present invention is to take the problems of the aforementioned prior art into consideration and to recover and remove, as necessary, invalid data in the memory card, which occurs due to recording operations and procedures being interrupted or improperly carried out, while making it possible to detect interruptions in recording which arise due to such anomalistic situations as, for example, the memory card being removed, the battery of the electronic still camera body being removed, or the realization of sharp drops in battery capacity occurring while data is being recorded to the memory card or other recording mediums and systems.